home *** CD-ROM | disk | FTP | other *** search
- Path: nntp.hut.fi!usenet
- From: oahvenla@vesipyssy.cs.hut.fi (Osma Ahvenlampi)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Name spaces (Was Re: Frustrated Jolyon (was Re: E - Just say NO! (was Re: Visual E - New E))
- Date: 11 Apr 1996 14:58:20 +0300
- Organization: What, me, organised?
- Sender: oahvenla@vesipyssy.cs.hut.fi
- Distribution: inet
- Message-ID: <jdjg2ab6kgz.fsf_-_@vesipyssy.cs.hut.fi>
- References: <4k7k0p$4u4@pravda.aa.msen.com> <DpJo8w.HqA@cix.compulink.co.uk>
- <4kgj0e$1ht@irz413.inf.tu-dresden.de>
- NNTP-Posting-Host: vesipyssy.cs.hut.fi
- Mime-Version: 1.0
- Content-Type: text/plain; charset=US-ASCII
- In-reply-to: ss37@irz.inf.tu-dresden.de's message of 10 Apr 1996 17:10:06
- +0200
- X-Newsreader: Gnus v5.1
-
- In article <4kgj0e$1ht@irz413.inf.tu-dresden.de> ss37@irz.inf.tu-dresden.de (Sven Steiniger) writes:
- >problems. Besiedes, in C you have to write every function/variable-name in
- >the same case. The older standard-functions (like string.h/strchr()) are
- >standard lowercase. But if you use newer includes (like for w*nd*ws) you
- >often know the function-name but dont know the case of the latters..
-
- Uhm, I think you've missed a point.
-
- ANSI C and UNIX kernel functions are in lower case. AmigaOS and
- Windows have the naming practise of using mixed case with a capital
- letter in the beginning of the function, while X (blechh) for example
- has a weird mix of mixed case with a lower case letter in the
- beginning, and sometimes mixed case with a capital X, etc.
-
- The point is to avoid name space clashes. If you use functions with
- only lower case, words delimited with _'s, you are sure to avoid using
- the name of any ANSI C or AmigaOS function, even if you have no idea
- what all the functions available in those libraries are named. This is
- not at all a question of "older" and "newer" includes.
-
- While it may seem a good idea for a language to give stricter, and
- enforced, rules of naming, it will also mean that the language will
- make the name space much smaller than it could be, and some library
- functions, written with languages that do not restrict naming, will be
- permanently out of reach. This is a tradeoff between compatibility
- through flexibility, and more certain third party code legibility.
-
- --
- An idea is not responsible for the people who believe in it.
- | "Osma Ahvenlampi" <mailto:oa@iki.fi> <http://www.iki.fi/oa/> |
- | Amiga&BeBox&ClassAct&Voodoo&ARTech cool stuff: I-Net225&AWeb |
- --
-